package java8_24.chongwu;

/**
 * @author oldliu
 * @since 1.0
 */
public class Dog extends  Pet {
    private String strain;//类别
    public Dog(String name, String sex, int health, int love) {

        super(name, sex, health, love);
        System.out.println("狗的构造方法结束");
    }

    public String getStrain() {
        return strain;
    }

    public void setStrain(String strain) {
        this.strain = strain;
    }
    //加一个方法
    public void catchMouse(){
        System.out.println(getName()+"正在抓老鼠！");
    }

    @Override//重写父类的方法
    public void eat() {
        //super.eat();
        System.out.println(super.getName()+"在吃狗粮！");
    }
}
